local fuzheng = fk.CreateSkill {
  name = "water_fuzheng",
}

Fk:loadTranslationTable{
  ["water_fuzheng"] = "辅政",
  [":water_fuzheng"] = "出牌阶段限一次，你可二选一行以下一项：1. 摸1张牌并移动场上的一张牌；2. 弃置任意张牌并从牌堆摸等量+2张牌。",
  ["water_fuzheng:draw"] = "摸1张牌并移动场上的一张牌",
  ["water_fuzheng:discard"] = "弃置x张牌然后从牌堆摸等量+2张牌",
  ["#water_fuzheng_move"] = "请选择要移动的的角色",
  ["#water_fuzheng_discard"] = "请弃置任意张牌",
}

fuzheng:addEffect("active", {
  anim_type = "control",
  card_num = 0,
  target_num = 0,
  can_use = function(self, player)
    return player:usedSkillTimes(self.name,Player.HistoryPhase) < 1
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local choice = room:askForChoice(player, {"water_fuzheng:draw", "water_fuzheng:discard"}, self.name)
    if choice == "water_fuzheng:draw" then
      player:drawCards(1, self.name)
      if #room:canMoveCardInBoard() > 0 then
        local targets = room:askToChooseToMoveCardInBoard(player, {
          prompt = "#water_fuzheng_move",
          skill_name = self.name,
          cancelable = true,
        })
      if #targets == 2 then
        room:askToMoveCardInBoard(player, {
          target_one = targets[1],
          target_two = targets[2],
          skill_name = fuzheng.name,
        })
      end
    end
    elseif choice == "water_fuzheng:discard" then
      local cards = room:askForDiscard(player, 1, 99, false, self.name, true,".","#water_fuzheng_discard")
      if #cards > 0 then
        player:drawCards(#cards+2, self.name)
      end
    end
  end,
})



return fuzheng 